package com.ljx.funchat.sensitive.service.impl;

import com.ljx.funchat.sensitive.algorithm.TrieSearcher;
import com.ljx.funchat.sensitive.service.SensitiveService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


@Service
public class SensitiveServiceImpl implements SensitiveService {

    @Autowired
    private TrieSearcher trieSearcher;

    @Override
    public String getFilterStr(String str) {
        return trieSearcher.replace(str, "***");
    }
}
